//add fcounty for Minnesota
// first associate each mcd with county. Then county to fips
// fips codes accessed here: https://www.nrcs.usda.gov/wps/portal/nrcs/detail/national/home/?cid=nrcs143_013697
// mcd to county accessed here: https://www.census.gov/geo/reference/codes/place.html

gen fcounty=.


replace fcounty=1 if county_name=="Aitkin" & state=="Minnesota"
replace fcounty=3 if county_name=="Anoka" & state=="Minnesota"
replace fcounty=5 if county_name=="Becker" & state=="Minnesota"
replace fcounty=7 if county_name=="Beltrami" & state=="Minnesota"
replace fcounty=9 if county_name=="Benton" & state=="Minnesota"
replace fcounty=11 if county_name=="Big Stone" & state=="Minnesota"
replace fcounty=13 if county_name=="Blue Earth" & state=="Minnesota"
replace fcounty=15 if county_name=="Brown" & state=="Minnesota"
replace fcounty=17 if county_name=="Carlton" & state=="Minnesota"
replace fcounty=19 if county_name=="Carver" & state=="Minnesota"
replace fcounty=21 if county_name=="Cass" & state=="Minnesota"
replace fcounty=23 if county_name=="Chippewa" & state=="Minnesota"
replace fcounty=25 if county_name=="Chisago" & state=="Minnesota"
replace fcounty=27 if county_name=="Clay" & state=="Minnesota"
replace fcounty=29 if county_name=="Clearwater" & state=="Minnesota"
replace fcounty=31 if county_name=="Cook" & state=="Minnesota"
replace fcounty=33 if county_name=="Cottonwood" & state=="Minnesota"
replace fcounty=35 if county_name=="Crow Wing" & state=="Minnesota"
replace fcounty=37 if county_name=="Dakota" & state=="Minnesota"
replace fcounty=39 if county_name=="Dodge" & state=="Minnesota"
replace fcounty=41 if county_name=="Douglas" & state=="Minnesota"
replace fcounty=43 if county_name=="Faribault" & state=="Minnesota"
replace fcounty=45 if county_name=="Fillmore" & state=="Minnesota"
replace fcounty=47 if county_name=="Freeborn" & state=="Minnesota"
replace fcounty=49 if county_name=="Goodhue" & state=="Minnesota"
replace fcounty=51 if county_name=="Grant" & state=="Minnesota"
replace fcounty=53 if county_name=="Hennepin" & state=="Minnesota"
replace fcounty=55 if county_name=="Houston" & state=="Minnesota"
replace fcounty=57 if county_name=="Hubbard" & state=="Minnesota"
replace fcounty=59 if county_name=="Isanti" & state=="Minnesota"
replace fcounty=61 if county_name=="Itasca" & state=="Minnesota"
replace fcounty=63 if county_name=="Jackson" & state=="Minnesota"
replace fcounty=65 if county_name=="Kanabec" & state=="Minnesota"
replace fcounty=67 if county_name=="Kandiyohi" & state=="Minnesota"
replace fcounty=69 if county_name=="Kittson" & state=="Minnesota"
replace fcounty=71 if county_name=="Koochiching" & state=="Minnesota"
replace fcounty=73 if county_name=="Lac qui Parle" & state=="Minnesota"
replace fcounty=75 if county_name=="Lake" & state=="Minnesota"
replace fcounty=77 if county_name=="Lake of the Woods" & state=="Minnesota"
replace fcounty=79 if county_name=="Le Sueur" & state=="Minnesota"
replace fcounty=81 if county_name=="Lincoln" & state=="Minnesota"
replace fcounty=83 if county_name=="Lyon" & state=="Minnesota"
replace fcounty=85 if county_name=="McLeod" & state=="Minnesota"
replace fcounty=87 if county_name=="Mahnomen" & state=="Minnesota"
replace fcounty=89 if county_name=="Marshall" & state=="Minnesota"
replace fcounty=91 if county_name=="Martin" & state=="Minnesota"
replace fcounty=93 if county_name=="Meeker" & state=="Minnesota"
replace fcounty=95 if county_name=="Mille Lacs" & state=="Minnesota"
replace fcounty=97 if county_name=="Morrison" & state=="Minnesota"
replace fcounty=99 if county_name=="Mower" & state=="Minnesota"
replace fcounty=101 if county_name=="Murray" & state=="Minnesota"
replace fcounty=103 if county_name=="Nicollet" & state=="Minnesota"
replace fcounty=105 if county_name=="Nobles" & state=="Minnesota"
replace fcounty=107 if county_name=="Norman" & state=="Minnesota"
replace fcounty=109 if county_name=="Olmsted" & state=="Minnesota"
replace fcounty=111 if county_name=="Otter Tail" & state=="Minnesota"
replace fcounty=113 if county_name=="Pennington" & state=="Minnesota"
replace fcounty=115 if county_name=="Pine" & state=="Minnesota"
replace fcounty=117 if county_name=="Pipestone" & state=="Minnesota"
replace fcounty=119 if county_name=="Polk" & state=="Minnesota"
replace fcounty=121 if county_name=="Pope" & state=="Minnesota"
replace fcounty=123 if county_name=="Ramsey" & state=="Minnesota"
replace fcounty=125 if county_name=="Red Lake" & state=="Minnesota"
replace fcounty=127 if county_name=="Redwood" & state=="Minnesota"
replace fcounty=129 if county_name=="Renville" & state=="Minnesota"
replace fcounty=131 if county_name=="Rice" & state=="Minnesota"
replace fcounty=133 if county_name=="Rock" & state=="Minnesota"
replace fcounty=135 if county_name=="Roseau" & state=="Minnesota"
replace fcounty=137 if county_name=="St. Louis" & state=="Minnesota"
replace fcounty=139 if county_name=="Scott" & state=="Minnesota"
replace fcounty=141 if county_name=="Sherburne" & state=="Minnesota"
replace fcounty=143 if county_name=="Sibley" & state=="Minnesota"
replace fcounty=145 if county_name=="Stearns" & state=="Minnesota"
replace fcounty=147 if county_name=="Steele" & state=="Minnesota"
replace fcounty=149 if county_name=="Stevens" & state=="Minnesota"
replace fcounty=151 if county_name=="Swift" & state=="Minnesota"
replace fcounty=153 if county_name=="Todd" & state=="Minnesota"
replace fcounty=155 if county_name=="Traverse" & state=="Minnesota"
replace fcounty=157 if county_name=="Wabasha" & state=="Minnesota"
replace fcounty=159 if county_name=="Wadena" & state=="Minnesota"
replace fcounty=161 if county_name=="Waseca" & state=="Minnesota"
replace fcounty=163 if county_name=="Washington" & state=="Minnesota"
replace fcounty=165 if county_name=="Watonwan" & state=="Minnesota"
replace fcounty=167 if county_name=="Wilkin" & state=="Minnesota"
replace fcounty=169 if county_name=="Winona" & state=="Minnesota"
replace fcounty=171 if county_name=="Wright" & state=="Minnesota"
replace fcounty=173 if county_name=="Yellow Medicine" & state=="Minnesota"

